package student.convert

import org.apache.flink.api.scala._

object WordCount {
  def main(args: Array[String]): Unit = {
    val env  = ExecutionEnvironment.getExecutionEnvironment
    val data = env.readTextFile("Input/Word.txt")
    data
      .flatMap(_.split(" "))
      .map((_,1))
      .groupBy(0)
      .sum(1)
      .print()
  }
}
